﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace FrameWorkSong
{
    public class LevelManager
    {
        private static List<string> mLevelName;
        public static int Index { get; set; }
        public static void Init(List<string> levelNames)
        {
            mLevelName = levelNames;
            Index = 0;
        }
        public static void LoadCurrent()
        {
            SceneManager.LoadScene(mLevelName[Index]);
        }
        public static void LoadNext()
        {
            Index++;
            if (Index>= mLevelName.Count )
            {
                Index = 0;
            }
            SceneManager.LoadScene(mLevelName[Index]);
        }
    }
}
